how to find specific string pattern in python